import { objtype } from "../type";
export const obj: objtype = {
  top: 0,
  limit: { x: 1, y: 5 },
  _title: "",
  hashEle: dom.index.index,
  isAndmi: false,
};
Object.defineProperty(obj, "url", {
  enumerable: false,
  configurable: true,
  get() {
    return this._url;
  },
  set(vlaue: string) {
    this._url = vlaue;
    if (obj._title !== (dom.herder.findtitleipt as any).value) {
      this._title = (dom.herder.findtitleipt as any).value;
      console.log("当前title:", this._title);
    }
    console.log("当前url:", this._url);
  },
});

import dom, { ajax } from "./init.js";
import * as content from "./content/article/aritcle.js";
import * as header from "./header/herder.js";
import * as navigation from "./navigation/navigation.js";
import * as user from "./content/user/user.js";
import * as login from "./content/user/login.js";
import * as doc from "../util/domcment.js";
import * as topevent from "./topswitch/eventhandle.js";
import * as comment from "./content/comment/comment.js";
import "../util/router.js";
import "../util/alent.js";

//登录
//进入页面渲染首页
content;
header;
navigation;
login;
comment;
//进入页面的初始化
topevent.initTop2();
content.initarticle();
user.islogin();
navigation.isarticle();
document.onkeyup = doc.findtitle;
//右侧排行榜模块
if (dom.top.switch) {
  dom.top.switch.addEventListener("mouseover", topevent.topover);
  dom.top.switch.addEventListener("mouseout", topevent.topout);
  dom.top.switch.addEventListener("click", topevent.topclick);
} else throw "dom.top.switch不存在";
